import RPi.GPIO as gpio

import time 

import sys

PIN_NO_BEEP = 12
gpio.setwarnings(False) 
gpio.setmode(gpio.BCM)
gpio.setup(PIN_NO_BEEP,gpio.OUT,initial=gpio.HIGH)

def beep(seconds):
    gpio.output(PIN_NO_BEEP,gpio.LOW)
    time.sleep(seconds)
    gpio.output(PIN_NO_BEEP,gpio.HIGH)

def beepAction(secs,sleepsecs,times):
    for i in range(times):
        beep(secs)
        time.sleep(sleepsecs)

while True:
    t = time.localtime()
    h = t.tm_hour
    m = t.tm_min
    s = t.tm_sec
    w = time.strftime('%w',t)

    time.sleep(0.3)

    if h == 18 and m == 27:
        beepAction(0.3,0.5,6)
        time.sleep(1)
